package strategy.improve;

import strategy.improve.behavior.run.BadRunBehavior;
import strategy.improve.behavior.swim.GoodSwimBehavior;

public class RedDuck extends Duck {
    // 构造方法中指定具体行为，不指定则默认空行为
    public RedDuck() {
        super.swimBehavior = new GoodSwimBehavior();
        super.runBehavior = new BadRunBehavior();
    }

    @Override
    public void display() {
        System.out.println("我是红色鸭子~");
    }
}
